﻿dvg_atlantia_referendum = {
	is_shown = {
		exists = c:ATL
		this = c:ATL
		NOT = { has_global_variable = atlantia_independent }
	}

    possible = {
		year >= 1840
	}

    when_taken = {
		trigger_event = { id = dvg_atlantia.1 popup = yes days = 10 }
		c:LOT = { trigger_event = { id = dvg_atlantia.11 popup = yes } }
		c:AMA = { trigger_event = { id = dvg_atlantia.11 popup = yes } }
    }

	ai_chance = {
		base = 100
	}
}

dvg_nouvellsatian_support = {
	is_shown = {
		exists = c:ATL
		this = c:ATL
		exists = c:NEA
		
		NOT = { has_global_variable = nouvellsatian_support }
	}

    possible = {
	}

    when_taken = {
		c:NEA = {
			trigger_event = { id = dvg_atlantia.5 popup = yes }	
		}
    }

	ai_chance = {
		base = 100
	}
}

dvg_nouvellsatian_integration = {
	is_shown = {
		exists = c:ATL
		this = c:ATL
		exists = c:NEA
	}

    possible = {
		has_technology_researched = mutual_funds
		c:NEA = {
			is_at_war = no
			owner = {
				is_ai = yes
				relations:root >= relations_threshold:friendly
				market = {
					owner = ROOT
				}
				this.gdp < root.gdp
			}
		}
	}
		
    when_taken = {
		trigger_event = { id = dvg_atlantia.7 popup = yes }
    }

	ai_chance = {
		base = 100
	}
}

dvg_atlantia_integration = {
	is_shown = {
		exists = c:ATL
		any_neighbouring_state = {
			owner = c:ATL
		}
	}

    possible = {
		has_technology_researched = mutual_funds
			c:ATL = {
				is_at_war = no
				owner = {
					is_ai = yes
					relations:root >= relations_threshold:friendly
					this.gdp < root.gdp
					market = {
						owner = ROOT
					}
				}
		}
	}

    when_taken = {
		trigger_event = { id = dvg_atlantia.8 popup = yes }
    }

	ai_chance = {
		base = 100
	}
}
